import QtQuick 1.0

Rectangle {

    gradient: Gradient {
        GradientStop { position: 0; color: "limegreen" }
        GradientStop { position: 1; color: "darkgreen" }
    }

    ListView {
        anchors.fill: parent
        model: 100
        spacing: 10
        delegate: Rectangle {
            radius: 20
            border {
                width: 4
                color: "steelblue"
            }
            color: mouseArea.pressed ? "blue" : "darkslategrey"
                // if hovering, use something like
                //mouseArea.containsMouse ? (mouseArea.pressed ? "blue" : "green") : "yellow"

            anchors {
                margins: 10
                left: parent.left
                right: parent.right
            }

            height: 100;

            Text {
                anchors.fill: parent
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignHCenter
                text: index
                color: "white"
                font {
                    pixelSize: 50
                }
            }

            MouseArea {
                id: mouseArea
                anchors.fill: parent
                //hoverEnabled: true
            }

        }

    }

}
